package com.mingqijia.gassafety.shared.constant;

public enum AppealStateEnum {

    WAITING_HANDLE(0, "待处理"),
    HANDLING(1, "工单处理中"),
    HAS_HANDLED(2, "已处理"),
    FINISHED(3, "工单处理完成"),
    UNCLOESED(4, "未办结"),
    CLOSED(5, "已办结"),
    HANDLED_INSTALL(6, "安装调试"),
    HANDLED_TEST(7, "工单调试"),
    UN_NEED_HANDLE(8, "无需处理"),;

    AppealStateEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private static final AppealStateEnum[] VALUES = AppealStateEnum.values();

    public static AppealStateEnum matcher(int value) {
        for (AppealStateEnum ele : VALUES) {
            if (ele.code == value) {
                return ele;
            }
        }
        return AppealStateEnum.WAITING_HANDLE;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private Integer code;
    private String msg;
}
